<?php

namespace App\Models;

class EwMemberAuth extends BaseModel
{

    /**
     *
     * @var integer
     * @Primary
     * @Column(type="integer", length=11, nullable=false)
     */
    public $id;

    /**
     *
     * @var string
     * @Column(type="string", length=10, nullable=true)
     */
    public $name;

    /**
     *
     * @var string
     * @Column(type="string", length=18, nullable=true)
     */
    public $identity_num;

    /**
     *
     * @var integer
     * @Column(type="integer", length=1, nullable=true)
     */
    public $live_type;

    /**
     *
     * @var integer
     * @Column(type="integer", length=1, nullable=true)
     */
    public $state;

    /**
     *
     * @var string
     * @Column(type="string", length=255, nullable=true)
     */
    public $refuse;

    /**
     *
     * @var string
     * @Column(type="string", length=150, nullable=true)
     */
    public $front_image;

    /**
     *
     * @var string
     * @Column(type="string", length=150, nullable=true)
     */
    public $back_image;

    /**
     *
     * @var string
     * @Column(type="string", nullable=true)
     */
    public $create_time;

    /**
     * Initialize method for model.
     */
    public function initialize()
    {
		parent::initialize();
        $this->belongsTo('id', 'App\Models\\EwMember', 'id', ['alias' => 'EwMember']);
    }

    /**
     * Returns table name mapped in the model.
     *
     * @return string
     */
    public function getSource()
    {
        return 'ew_member_auth';
    }

    /**
     * Allows to query a set of records that match the specified conditions
     *
     * @param mixed $parameters
     * @return EwMemberAuth[]|EwMemberAuth
     */
    public static function find($parameters = null)
    {
        return parent::find($parameters);
    }

    /**
     * Allows to query the first record that match the specified conditions
     *
     * @param mixed $parameters
     * @return EwMemberAuth
     */
    public static function findFirst($parameters = null)
    {
        return parent::findFirst($parameters);
    }

}
